# 导入flask-script扩展进行命令行运行指定
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand

from info import create_app, db
# 让模型类被引用,用来迁移创建表
from info import models

app = create_app('Development')
# 实例化管理器对象
manage = Manager(app)
# 使用迁移框架
Migrate(app, db)
# 添加迁移命令
manage.add_command('db', MigrateCommand)


if __name__ == '__main__':
    print(app.url_map)
    manage.run()